package com.icloud.common.database.enums;

import lombok.Getter;

@Getter
public enum CurrencyEnum {
    BCPC("BCPC");
    //USDT("USDT");
    private final String code;

    CurrencyEnum(String code){
        this.code = code;
    }

    public static CurrencyEnum byCode(String code) {
        for (CurrencyEnum e: CurrencyEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }

    public static boolean isBCPC(String code){
        return BCPC.getCode().equalsIgnoreCase(code);
    }
}
